﻿// JSON C# Class Generator
// http://at-my-window.blogspot.com/?page=json-class-generator

using System;
using Newtonsoft.Json.Linq;


namespace BuscoPre.Repository.MLA.Searchs
{

    internal class Result
    {

        private JObject __jobject;
        public Result(JObject obj)
        {
            this.__jobject = obj;
        }

        public string Id
        {
            get
            {
                return JsonClassHelper.ReadString(JsonClassHelper.GetJToken<JValue>(__jobject, "id"));
            }
        }

        public string SiteId
        {
            get
            {
                return JsonClassHelper.ReadString(JsonClassHelper.GetJToken<JValue>(__jobject, "site_id"));
            }
        }

        public string Title
        {
            get
            {
                return JsonClassHelper.ReadString(JsonClassHelper.GetJToken<JValue>(__jobject, "title"));
            }
        }

        public string Subtitle
        {
            get
            {
                return JsonClassHelper.ReadString(JsonClassHelper.GetJToken<JValue>(__jobject, "subtitle"));
            }
        }

        public double Price
        {
            get
            {
                return JsonClassHelper.ReadFloat(JsonClassHelper.GetJToken<JValue>(__jobject, "price"));
            }
        }

        public string CurrencyId
        {
            get
            {
                return JsonClassHelper.ReadString(JsonClassHelper.GetJToken<JValue>(__jobject, "currency_id"));
            }
        }

        public bool AcceptsMercadoPago
        {
            get
            {
                return JsonClassHelper.ReadBoolean(JsonClassHelper.GetJToken<JValue>(__jobject, "accepts_mercado_pago"));
            }
        }

        public string Permalink
        {
            get
            {
                return JsonClassHelper.ReadString(JsonClassHelper.GetJToken<JValue>(__jobject, "permalink"));
            }
        }

        public string Thumbnail
        {
            get
            {
                return JsonClassHelper.ReadString(JsonClassHelper.GetJToken<JValue>(__jobject, "thumbnail"));
            }
        }

        public string ListingMode
        {
            get
            {
                return JsonClassHelper.ReadString(JsonClassHelper.GetJToken<JValue>(__jobject, "listing_mode"));
            }
        }

        public string CurrencySymbol
        {
            get
            {
                return JsonClassHelper.ReadString(JsonClassHelper.GetJToken<JValue>(__jobject, "currency_symbol"));
            }
        }

    }
}
